#include <iostream>
#include<random>
using namespace std;

struct Boxer
{
    string name;
    int weight;
    short life;
    void hello()
    {
        cout << "Hello. I am "<< name <<"("<<life<<")"<< endl;
    }
    int punch()
    {
        random_device rd;
        mt19937 gen(rd());
        uniform_int_distribution<> r(0,1);
        int choice = r(gen);
        cout << choice << endl;
        return choice;
    }
    int dodge()
    {
        random_device rd;
        mt19937 gen(rd());
        uniform_int_distribution<> r(0,1);
        int choice = r(gen);
        cout << choice << endl;
        return choice;
    }
};

int main()
{
    Boxer ali;
    ali.name = "Ali";
    ali.weight = 80;
    ali.life = 100;

    
    Boxer tyson;
    tyson.name = "Tyson";
    tyson.weight  = 80;
    tyson.life = 100;
    ali.hello();
    tyson.hello();
    if(ali.punch() == tyson.dodge())
        tyson.life -= 10;
    if(tyson.punch() == ali.dodge())
        ali.life -= 10;
     ali.hello();
    tyson.hello();
}